<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <link rel="stylesheet" href="../node_modules/animate.css/animate.min.css">
  <style>
    .div1 {
      width: 100px;
      height: 100px;
      background-color: red;
    }
  </style>
</head>

<body>
  <div id="app">
    <p>过渡效果：元素切换时，使得切换过程更流畅、自然、美观</p>
    <p>transition组件的作用是将6个class分别添加或者移除，作用于被切换的元素</p>
    <button @click="isShow = !isShow">toggle</button>
    <transition
      enter-active-class="animate__animated animate__bounce"
      leave-active-class="animate__animated animate__bounce"
    >
      <div v-show="isShow" class="div1"></div>
    </transition>
  </div>
  <script src="../vue.js"></script>
  <script>
    let vm = new Vue({
      el: '#app',
      data: {
        isShow: true
      }
    })
  </script>
</body>

</html>